package com.cloudmusic.service.impl;

import com.alibaba.fastjson.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.cloudmusic.dao.MusicMapper;
import com.cloudmusic.service.MusicService;

import java.util.List;

@Service
@Transactional
public class MusicServiceimpl implements MusicService{

	@Autowired
	MusicMapper musicmapper;
	
	
	@Override
	public String selectMusicLocal(String sid) {
		// TODO Auto-generated method stub
		String musiclocal = musicmapper.selectMusicLocal(sid);
		return musiclocal;
	}

	@Override
	public JSONObject selectMusicName(String sid) {
		List list = musicmapper.selectMusicName(sid);
		JSONObject json = new JSONObject();
		json.put("rows", list);
		return json;
	}


}
